import Cookies from 'js-cookie'
import { getToken } from '@/api/index'
// 获取token


const TokenKey = 'Access-Token'

export async function setToken() {
    await getToken().then(res => {
        Cookies.set(TokenKey, res.data.obj.token)
    })
}

export function getTokenFromCookie() {
    return Cookies.get(TokenKey)
}
